package edu.its.dreamteam.daf.beans;

import java.io.Serializable;
import java.util.Date;

public class BuyPlayer extends BaseBean implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String idBuy;
	private String idSell;
	private String idTeam;
	private String status;
	private Integer bid;
	private Date dateBuy;
	
	private Team team;
	private SellPlayer sellPlayer;
	
	public String getIdBuy() {
		return idBuy;
	}


	public void setIdBuy(String idBuy) {
		this.idBuy = idBuy;
	}


	public String getIdSell() {
		idSell = getSellPlayer().getIdSell();
		return idSell;
	}


	public void setIdSell(String idSell) {
		this.idSell = idSell;
		getSellPlayer().setIdSell(idSell);
	}


	public String getIdTeam() {
		idTeam = getTeam().getIdTeam();
		return idTeam;
	}


	public void setIdTeam(String idTeam) {
		this.idTeam = idTeam;
		getTeam().setIdTeam(idTeam);
	}


	public String getStatus() {
		return status;
	}


	public void setStatus(String status) {
		this.status = status;
	}


	public Integer getBid() {
		return bid;
	}


	public void setBid(Integer bid) {
		this.bid = bid;
	}


	public Date getDateBuy() {
		return dateBuy;
	}


	public void setDateBuy(Date dateBuy) {
		this.dateBuy = dateBuy;
	}

	
	public Team getTeam() {
		if(team==null){
			team = new Team();
		}
		return team;
	}


	public void setTeam(Team team) {
		this.team = team;
	}


	public SellPlayer getSellPlayer() {
		if(sellPlayer==null){
			sellPlayer = new SellPlayer();
		}
		return sellPlayer;
	}


	public void setSellPlayer(SellPlayer sellPlayer) {
		this.sellPlayer = sellPlayer;
	}


	@Override
	protected String getPrimaryKey() {
		return getIdBuy();
	}

}
